﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginUser.ascx.cs" Inherits="LoginUser" %>

<script>
function FilterNonNumericInput(dom)
{
    var k = event.keyCode;

    if((k > 57 || k < 48) && k != 13)
    {
        return false;
    }

    // Only Numeric and Enter Key is permitted.
}

function FilterUserNameInput(dom)
{
    var k = event.keyCode;

    if(k <= 57 && k >= 48)
    {
        // Numeric Key
        if(dom.value.length < 4)
        {
            return true;
        }
    }
    else if(k == 13)
    {
        // Enter Key
        return true;
    }

    return false;
}

</script>

<table width="100%" height="100%">
    <tr>
        <td align=center>
        
            <fieldset style="width:300px;">
                <legend>登陆</legend>        
                <div style="text-align:center">
                
                    <table width="260">
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label_Error" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text="用户名"></asp:Label>
                            </td>
                            <td width="200">
                                <asp:TextBox ID="TextBox_UserName" onkeypress="return FilterUserNameInput(this);" runat="server" Width="100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text="密码"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox2" onkeypress="return FilterNonNumericInput(this);" runat="server" TextMode="Password" Width="100%" ></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="Button_Confirm" runat="server" OnClick="Button_Confirm_Click" Text="确定" />
                            </td>
                        </tr>
                    </table>
                
                </div>
            </fieldset>
            
        </td>
    </tr>
</table>



